<big>F2F STORE</big><br>
<small>pusatnya IT jogja</small>
<hr>
<table>
    <tr>
        <td width="150">
            Distributor
        </td>
        <td>
            <?=$pembelian->nama_distributor?>
        </td>
    </tr>
    <tr>
        <td>
            Tanggal Pembelian
        </td>
        <td>
            <?=$pembelian->tgl_pembelian?>
        </td>
    </tr>
</table>
<table>
    <tr>
        <td>
            Nama Barang
        </td>
        <td>
            @Harga
        </td>
        <td>
            Qty
        </td>
        <td>
            Jumlah
        </td>
    </tr>

<?
$jmlSeluruh=0;
    foreach($detailpembelian as $detail){
        $total=$detail->harga_beli*$detail->jml_beli;
        $jmlSeluruh+=$total;
        echo"
        <tr>
        <td>
            $detail->nama_barang
        </td>
        <td>
            $detail->harga_beli
        </td>
        <td>
            $detail->jml_beli
        </td>
        <td>
            $total
        </td>
    </tr>
        ";
    }
?>
    <tr><td colspan="3"><b>JUMLAH</b></td><td><?=$jmlSeluruh?></td></tr>
    </table>